﻿using System;
using System.Windows.Input;
using ISRecord.View.Services;
using GalaSoft.MvvmLight;

namespace ISRecord.View.ViewsModel
{
    public class WorkspaceViewModel: ViewModelBase
    {
        public event EventHandler RequestClose;
        DelegateCommand closeCommand;
        void OnRequestClose()
        {
            EventHandler handler = this.RequestClose;
            if (handler != null)
            {
                handler(this, EventArgs.Empty);
            }
        }
        public ICommand CloseCommand
        {
            get
            {
                if (closeCommand == null)
                {
                    closeCommand = new DelegateCommand(param => OnRequestClose());
                }
                return closeCommand;
            }
        }
        public virtual bool ModelHasChanges
        {
            get { return false; }
        }
        public virtual string DisplayName { get; protected set; }

    }
}
